package cmd

import (
	"github.com/gin-gonic/gin"

	"aicloud/monitor-apiserver/pkg/util"
	"aicloud/monitor-apiserver/server"
)

func main() {

	util.GetEnvOrDefault("PORT", "8080")
	httpPort := util.GetEnvOrDefault("PORT", "8080")
	listenAddress := ":" + httpPort
	router := gin.New()
	router.Use(gin.Recovery())
	router = server.Router(router)
	util.GetLogger().Info("http server start ")
	_ = router.Run(listenAddress)

}
